#include <iostream>
#include <queue>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <set>
#include <unordered_set>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
int main()
{
	double x1,x2,y1,y2,r;
	int n;
	cin>>n;
	while(n--)
	{
		cin>>x1>>y1>>x2>>y2>>r;
		double dx=x1-x2;
		double dy=y1-y2;
		double r1=sqrt(dx*dx+dy*dy);
		if(r1<=r)
		{
			cout<<"Yes"<<endl;
		}
		else
		{
			cout<<"No"<<' ';
			
			printf("%.3lf\n",r1-r);
		}
	}
    
	return 0;
}

